#time calendar datetime
import datetime
import time
# result=time.time()
#
# years=result/(24*60*60*365)+1970
# print(years)
#
# print(result)
#
# result=time.localtime()
# print(result)

# t=time.time()
# result=time.ctime(t)
# print(result)

# time_tuple=time.localtime()
# result=time.asctime(time_tuple)
# print(result)

#time.strftime(格式字符串，时间元组)

# result=time.strftime("%Y/%m/%d %H:%M:%S",time.localtime())
# print(result)
# pt=time.strptime("2024/10/31 15:14:22","%Y/%m/%d %H:%M:%S")
# print(pt)
#
# t=time.mktime(pt)
# print(t)

# time.process_time()

# start=time.process_time()
# for i in range(0,10000):
#     print(i)
#
# end=time.process_time()
#
# print(end-start)

# while True:
#     result=time.strftime("%Y/%m/%d %H:%M:%S",time.localtime())
#     print(result)
#     time.sleep(1)


# import calendar
# print(calendar.month(2024,11))

# import datetime
# t=datetime.datetime.now()
# # print(datetime.datetime.today())
#
# print(type(t))
# print(t.year)
# print(t.month)
# print(t.day)
# print(t.hour)
# print(t.minute)
# print(t.second)

# import datetime
# t=datetime.datetime.today()
# result=t+datetime.timedelta(days=7)
# print(t,result)

# first=datetime.datetime(2024,10,31,15,58,10)
# second=datetime.datetime(2024,11,1,15,58,10)
# print(first,type(first))

# delta=second-first
# print(delta,type(delta))
# print(delta.total_seconds())